home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 2: CDPD 1
/
Almathera Ten on Ten - Disc 2: CDPD 1.iso
/
pd
/
201-225
/
217
/
snipit
/
snipit.doc
< prev
next >
Wrap
Text File
|
1995-03-13
|
11KB
|
320 lines
SnipIt 1.2 - Copyright (c) 1988 - Scott Evernden, All Rights Reserved
What is SnipIt?
================
SnipIt is a CLI program which allows you to copy text directly from the
Amiga screen in any window, and then paste it into any other place, as
though you had typed that text at the keyboard. You mark the text you
want to 'snip' using the mouse. You also use the mouse to 'paste' the
last snipped text into the active window, requester, or anywhere.
SnipIt is a program which installs itself into the input stream handling
code of AmigaDOS. It waits for you to hold down the LEFT-AMIGA (or
optionally another key) while using the mouse.
Running the Program
===================
This program will only run properly from the CLI. You start it like
> snipit
at which point, SnipIt will install itself, and print a message.
You can control certain operations and modes of SnipIt when you first
install it and later while it is running. You do this by typing
"snipit" with 'option' letters and possible arguments. For example, you
can tell SnipIt to stop running:
> snipit q
In other words, type "snipit" followed by a "q" for 'quit'. Other
options to control SnipIt's behavior will be described below.
Marking Text to be Copied
=========================
To mark text to be copied, simply depress the LEFT-AMIGA key (by
default), move the mouse pointer to a position in any window containing
text and hold down the LEFT mouse button. While holding down the LEFT
mouse button you move the mouse to the opposite end of the text area you
want to copy and then release. As you do this, SnipIt will mark
(hilight) both ends of the area you are designating.
Once you have released the LEFT mouse button, SnipIt will fully
highlight and 'snapshot' the text within the area you have marked out.
Pasting the Copied Text
=======================
You can deposit the text you copied by, again, holding down the
LEFT-AMIGA key, and clicking the RIGHT mouse button.
SnipIt will inject keystroke codes into the input stream, so you can
paste text into any active window, requester, or anything else which is
expecting keyboard input.
You can paste copied text as many times as you want.
SnipIt will un-hilight the selected area whenever any output occurs in
the highlighted window. You can still paste the copied text, however,
even though the highlighting has been removed.
Limitations of This Version
===========================
SnipIt can recognize any font in any height, only as long as that font
is fixed width and 8 pixels wide.
SnipIt in its current form cannot recognize text which is italicised,
underlined, or is drawn in certain colors. In some unusual colored text
cases, SnipIt will be 'blind' thinking it is seeing space characters,
and you will get nothing but spaces while pasting.
SnipIt can only recognize character codes between ASCII 32-127, so
special characters (requiring the ALT key to generate) will not get
recognized properly. If SnipIt cannot figure out a character, it will
substitute a '?' (question mark) character.
SnipIt appears to work properly with the ConMan replacement console
handler by William Hawes. SnipIt also appears to work properly with the
NEWCON: window of AmigaDOS 1.3. SnipIt may highlight areas in a
peculiar fashion in windows having the GIMMEZEROZERO attribute (eg.,
AmigaBasic).
This program will also co-operate with programs like SunMouse and others
which can change window activation automatically. However, note that
each character of any pasted text will arrive in whatever window the
mouse is currently in.
New Features of Version 1.2
===========================
Automatically runs in the background
------------------------------------
You no longer need to 'run' SnipIt- the program is now capable of
detaching itself and running automatically in the background.
Snips from both consoles and regular windows
--------------------------------------------
SnipIt can now recognize text in plain old windows (not only just
console windows anymore). So, applications like WPLibrary P-Edit and
VT100 terminal programs can be 'snipped' from. Note that SnipIt assumes
that text is being displayed in the window is some kind of cell array
(like a terminal). It probably won't do what you want in programs like
Deluxe Paint, and others which can place text anywhere in the window.
Built in mini-help
------------------
SnipIt will give you a quick rundown of its options if you type:
> snipit h
or
> snipit ?
Prestring insertion while pasting
---------------------------------
The program now provides an option to insert a short text string
before each line of characters as it is pasted. This can be useful
if you are 'snipping' text which you wish to 'quote'. You do this
by depressing the LEFT-ALT key (by default), instead of the
LEFT-AMIGA key while pasting. For example, if I snip, and then
paste this paragraph using LEFT-ALT, I get:
> The program now provides an option to insert a short text string
> before each line of characters as it is pasted. This can be useful
> if you are 'snipping' text which you wish to 'quote'. You do this
> by depressing the LEFT-ALT key (by default), instead of the
> LEFT-AMIGA key while pasting. For example, if I snip, and then
> paste this paragraph using LEFT-ALT, I get:
Note, a "> " (the default) string has been prepended to each pasted
line. This string can be changed at any time by:
> snipit p "the prestring: "
where the text appears between quotes after a "p". Actually, you can
use any delimiter, and not only quotes, like:
> snipit p .the prestring: .
Just repeat the initial character at the end. Your prestring must
contain no more than 32 characters.
Character cell location adjustments
-----------------------------------
Sometimes, in non-console windows, the text may not be placed in
positions that SnipIt can locate. SnipIt 1.2 now provides options that
allow you to slightly adjust its idea of where characters are located in
the window:
> snipit x +2 y -1
will move the snip area in windows, right by 2 pixels and up by one. If
you find that SnipIt is producing lots of ???????s while pasting, then
you may need to use this option to adjust the cell area (highlighted
area) slightly. For example, P-Edit currently requires:
> snipit x -1
as text characters are draw one pixel higher than SnipIt would otherwise
assume. Dave Wecker's VT100 currently requires:
> snipit y -1
You can also correct the x and y cell positions in console windows using
the 'u' and 'v' options:
> snipit u -3 v +1
will move the snip area in consoles, left by 3 pixels, and down by one.
For example, Eric Haberfellner's Handshake (VT100 emulator) currently
needs:
> snipit v +3
In most circumstances, you shouldn't need to use the 'u' and 'v' options
to adjust for console windows.
Improved recognition
--------------------
SnipIt can now recognize highlighted and inverted characters- you no
longer have to move that darn cursor away from your text.
Freeze windows while snipping
-----------------------------
If you type:
> snipit l 1
("l" for 'lock') Snipit 1.2 will freeze the window or console which you
are snipping from. This can be useful if you are trying to 'snip' text
in a window that would otherwise scroll.
> snipit l 0
turns this option off.
Re-assignable keyboard use
--------------------------
Normally, you snip and paste using the LEFT-AMIGA key; you can paste
with a prestring using the LEFT-ALT key while pasting. These key
choices can be changed. You change the normal, or Command-A, key from
the LEFT-AMIGA to another key by:
> snipit a <hexcode>
where the <hexcode> is from this table:
LEFT-SHIFT .... 0001
RIGHT-SHIFT ... 0002
CONTROL ....... 0008
LEFT-ALT ...... 0010 <- default Command-B key
RIGHT-ALT ..... 0020
LEFT-AMIGA .... 0040 <- default Command-A key
RIGHT-AMIGA ... 0080
other values won't work. So, to use the CONTROL key instead, you:
> snipit a 0008 (or just 8, you don't need the leading 0s).
The Command-B key, normally the LEFT-ALT key, can be changed, for
example, to the Right-Shift key:
> snipit b 0002
Default settings
----------------
By default snipit acts as though you had done:
> snipit p"> " l0 u0 v0 x0 y0 a0040 b0010
meaning:
o (p) use "> " as the prestring when pasting with the Command-B key
o (l) don't freeze the window being snipped from
o (u, v) no adjustment to cell area when snipping from consoles
o (x, y) no adjustment to cell area when snipping from windows
o (a) use LEFT-AMIGA for Command-A operation- regular snips and pastes
o (b) use LEFT-ALT for Command-B operation- insert prestring on pastes
Bugs
====
I have not gone to any special effort to check if Windows or Screens are
closed, or otherwise disappear, while the mouse is being used to
highlight a text area. The system will likely Guru if this happens.
SnipIt only works properly with the usa0 keymap (more below). Dvorak
(usa2) will not, and certain non-usa keyboards/keymaps may not work
properly with SnipIt. However, a 'patch' program is included to modify
SnipIt to work with other keymaps. See the file "PATCH.DOC" for more
information.
Ideas for the Future
====================
In approximate order of importance to me:
The next SnipIt will hopefully do a better job in dealing with KeyMaps.
Currently, SnipIt uses a hardcoded table of keycodes for pasting
character codes into the input stream. I'm not real happy with this,
because it is not the best design. This will be fixed next.
Recognize, as an option, ALL characters, even ones requiring the ALT key
to generate (full 8-bit ASCII).
An 'appending' snip. The next version of SnipIt will probably allow you
to 'append' or add newly snipped material to the end of previously
snipped text. This way, you could actually 'compose' a message by
collecting text from different parts of one or several windows. The
Command-B key is planned for this use while snipping.
Send snipped text to a device or file instead of into the input stream.
This way, you could direct snipped text into a PIPE:, for example.
Use the clipboard- some day.
Recognize text that isn't 8 pixels wide, is colored, underlined or
italicised. Don't hold your breath on these.
The SnipIt program acts like 2 different programs:
1. As the resident SnipIt program doing the real work.
2. As the user interface communicating options to the resident SnipIt.
Currently, the resident SnipIt also carries the code used by the user
interface portion. This is a mild waste of memory (less than 5K). A
future version of SnipIt may release code sections not required for the
resident portion, thereby reducing consumption of memory.
==========================================================================
Comments and contributions to:
------------------------------
plink: SCOTT E
bix: s_evernden
cis: 73116,3451
uucp: {ames,rutgers}!harvard!m2c!applix!scott
scott@applix.m2c.org
Scott Evernden
9 Courtland St.
Holliston, MA 01746